package edu.bit.water.service;

import java.sql.SQLSyntaxErrorException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.stereotype.Service;

import edu.bit.water.dao.MetaEvaWbalTestAssociationDao;
import edu.bit.water.entity.MetaEvaWbalTest;

@Service
public class MetaEvaWbalTestAssociationService {

	@Autowired
	private MetaEvaWbalTestAssociationDao metaEvaWbalTestAssociationDao;
	
	/**
	 * 
	 * @param metaEvaWbalTest 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 * @throws BadSqlGrammarException
	 */
	public int insertMetaEvaWbalTestAssociation(MetaEvaWbalTest metaEvaWbalTest) throws BadSqlGrammarException{
		int n = metaEvaWbalTestAssociationDao.insertMetaEvaWbalTestAssociation(metaEvaWbalTest);
		return n;
	}

	public int updateMetaEvaWbalTestAssociation(MetaEvaWbalTest metaEvaWbalTest) throws BadSqlGrammarException{
		int n = metaEvaWbalTestAssociationDao.updateMetaEvaWbalTestAssociation(metaEvaWbalTest);
		return n;
	}
	
	/**
	 * 
	 * @param metaEvaWbalTest 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 */
	public int deleteMetaEvaWbalTestAssociation(MetaEvaWbalTest metaEvaWbalTest) {
		int n = metaEvaWbalTestAssociationDao.deleteMetaEvaWbalTestAssociation(metaEvaWbalTest);
		return n;
	}
}
